#include "shader_catalog.h"

using namespace krryn::view;

shader *shader_catalog::get_shader(const std::string &a_Filename){
	std::map<std::string, shader*>::iterator l_Shader = m_Shaders.find(a_Filename);

	if(l_Shader == m_Shaders.end()){
		shader *l_Shader = load_shader(a_Filename);
		m_Shaders[a_Filename] = l_Shader;
		return l_Shader;
	}else{
		return l_Shader->second;
	}
}